<?php $this->beginContent('/layouts/main2'); ?>
<script type="text/javascript">
    /*<![CDATA[*/
    jQuery(function($) {
        var width = $(window).width();
        if(width < 767){
           /* $('#column3-content').css('margin-left', '-10px');*/
        }
        else{
            $('#column3-content').addClass('span8');
        }
    })   
    /*]]>*/
</script>
<div class="row-fluid">
    <div class="span3 hidden-phone">
        <div id="leftbar"  style="min-height: 500px;margin-left: 1px;margin-top: 8px">	
            <?php
            $screen = Blyn::app()->getCurrentNode()->getUIManager()->getCurrentScreen();
            $leftMenu = Blyn::app()->getAppUI()->getMenu(BUIApp::LEFTMENU);
            //$leftMenu = Blyn::app()->getAppUI()->getMenu('leftMenu');
            $items = $leftMenu['items'];
            ?>
            <ul class="nav nav-list">
                <?php
                foreach ($items as $item) {
                    $itemText = $item['label'];
                    $class = '';
                    //$class = isset($item['active']) && $item['active'] ? 'active' : '';
                    if (isset($item['ajaxUrl']))
                        $itemText = $item['ajaxUrl'];
                    else {
                        $class = 'nav-header';
                    }
                    ?>
                    <li class='<?php echo $class; ?>'>
                        <?php echo $itemText; ?>
                    </li>  
                <?php } ?>
            </ul>
        </div>        
    </div>
    <div id="column3-content" style="padding-left:10px;padding-right: 10px">       
        <?php echo $content; ?>    
    </div>
    <div class="span2"></div>
</div>
<?php $this->endContent(); ?>